package com.dang.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dang.dao.BaseDAO;
import com.dang.entity.User;
import com.dang.service.UserService;
/**
 * 用户事务接口实现
 * 采用组合方式 注入 baseDao
 * @author 但劲松
 *
 */
@Service("userService")
public class UserServiceImpl implements UserService{

	@Resource
	private BaseDAO<User> baseDAO;
	/*
	@Override
	public User login(User s_user) {
		LinkedList<Object> param=new LinkedList<Object>();
		StringBuffer hql = new StringBuffer(" from User");
		if(StringUtil.isNotEmpty(s_user.getUserName())){
			hql.append(" and userName=?");
			param.add(s_user.getUserName());
		}
		if(StringUtil.isNotEmpty(s_user.getPassword())){
			hql.append(" and password=?");
			param.add(s_user.getPassword());
		}
		if(s_user.getStatus()==2){
			hql.append(" and status=2");
		}
		return baseDAO.get(hql.toString().replaceFirst("and", "where"), param);
	}
	*/
}
